home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / ubiquity / summary < prev    next >
Text File  |  2008-07-26  |  2KB  |  72 lines

  1. #! /bin/sh
  2. #set -e
  3.  
  4. . /usr/share/debconf/confmodule
  5.  
  6. language_name=
  7. db_get localechooser/languagelist
  8. if [ "$RET" ]; then
  9.     language_name="$(zgrep "^[^:]*:$RET:" \
  10.         /usr/lib/ubiquity/localechooser/languagelist.data.gz | \
  11.         head -n1 | cut -d: -f4)"
  12. fi
  13. db_subst ubiquity/summary LANGUAGE "$language_name"
  14. if db_get console-setup/variant && [ "$RET" ]; then
  15.     db_subst ubiquity/summary KEYMAP "$RET"
  16. else
  17.     db_get console-setup/layout
  18.     db_subst ubiquity/summary KEYMAP "$RET"
  19. fi
  20. db_get passwd/user-fullname
  21. db_subst ubiquity/summary FULLNAME "$RET"
  22. db_get passwd/username
  23. db_subst ubiquity/summary USERNAME "$RET"
  24. db_get time/zone # actually continent/city (usually)
  25. db_subst ubiquity/summary LOCATION "$RET"
  26.  
  27. # Migration Assistant
  28. db_capb escape
  29. ret=""
  30. newline='
  31. '
  32. db_get migration-assistant/partitions
  33. OLD_IFS="$IFS"
  34. IFS='
  35. '
  36. partitions="$(echo "$RET" | sed -e 's/, /\n/g')"
  37. for choice in $partitions; # Microsoft Windows XP Professional (/dev/hda1)
  38. do
  39.     part="$(expr match "$choice" '.*/\(.*\))$')" # hda1
  40.     db_get "migration-assistant/$part/users"
  41.     [ "$RET" ] || continue
  42.  
  43.     ret="$ret$choice:$newline"
  44.     users="$(echo "$RET" | sed -e 's/, /\n/g')"
  45.     for user in $users; do
  46.         ret="$ret $user: "
  47.         formatted_user="$(echo "$user" | sed -e 's/ /+/g')"
  48.         db_get "migration-assistant/$part/$formatted_user/items"
  49.         ret="$ret$RET$newline"
  50.     done
  51. done
  52. IFS="$OLD_IFS"
  53. db_subst ubiquity/summary MIGRATE \
  54.     "$(printf %s "${ret%$newline}" | debconf-escape -e)"
  55. db_capb
  56.  
  57. db_capb escape
  58. db_get ubiquity/partman-made-changes
  59. if [ "$RET" = true ]; then
  60.     db_metaget partman/confirm Extended_description
  61. else
  62.     db_metaget partman/confirm_nochanges Extended_description
  63. fi
  64. db_subst ubiquity/summary PARTMAN_CHANGES \
  65.     "$(printf %s "$RET" | debconf-escape -e)"
  66. db_capb
  67.  
  68. db_input high ubiquity/summary || true
  69. db_go
  70.  
  71. exit 0
  72.